<template>
  <ex_super_input :value="value" type="select" :attrs="{
    url: '/oms-api/property/OmsBaseCargoPropertyRpc/selectPage.json',
    urlParams: { status: 'ENABLE', pageSize: 9999 },
    storeData: true,
    filterable: true,
    clearable:true,
    option: (data) => { return { label: this.$formatNameCode(data.name, data.code), value: data.code } },
  }" @changeItem="cargoPropertyChange" @input="onInput" @change="onChange"/>
</template>

<script>
export default {

  props: {
    value: null,
  },
  data() {
    return {
    }
  },
  watch: {
  },
  computed: {

  },
  created() {

  },
  mounted() {
  },
  methods: {
    cargoPropertyChange(item){
      this.$emit('changeItem',item)
    },
    onInput(e) {
      this.$emit('input', e)
    },
    onChange(e) {
      this.$emit('change', e)
    },
  },
  destroyed() {

  }
};
</script>

<style lang="less" scoped>
.flexBox {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;

  &:last-child {
    margin-bottom: 0;
  }

  >div {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 5px;

    &:last-child {
      margin-right: 0;
    }

    >i {
      width: 30px;
      cursor: pointer;
    }
  }
}
</style>
